function Spinner(o) {
    this.spinDiv = o;
}

Spinner.prototype.onReady = function() {
    var $spinbox = jQuery(this.spinDiv).find("input.suSpinButton");

    var options = {};

    if ($spinbox.attr('min')) {
        options['min'] = $spinbox.attr('min');
    }
    if ($spinbox.attr('max')) {
        options['max'] = $spinbox.attr('max');
    }
    if ($spinbox.attr('step')) {
        options['step'] = $spinbox.attr('step');
    }
    
    $spinbox.spinbox(options);
}